package wo.resume.po;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

@Entity
@Table(name = "resume_work")
public class Work {
	private static Logger LOG = LogManager.getLogger(Work.class);
	
	/**
	 * ID
	 */
	@Id
	private String id;
	
	/**
	 * 单位
	 */
	@Column(length = 30)
	private String company;
	
	/**
	 * 开始日期
	 */
	@Temporal(TemporalType.DATE)
	private Date startDate;
	
	/**
	 * 结束日期
	 */
	@Temporal(TemporalType.DATE)
	private Date endDate;
	
	/**
	 * 
	 */
	@Column(length = 50)
	private String position;
	
	/**
	 * 简历
	 */
	@ManyToOne
	@JoinColumn(name = "resume_id")
	private Resume resume;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public Resume getResume() {
		return resume;
	}

	public void setResume(Resume resume) {
		this.resume = resume;
	}
}
